<script>
export default {
    components: {},
    props: {
        title:{
            type:String,
            default:''
        },
        bodyClasses:{
            default(){
                return {}
            }
        }
    },
    data() {
        return {

        }
    },
    computed: {},
    watch: {},
    methods: {}
}
</script>

<template>
    <div class="k-card">
        <div v-if="title !== '' || $slots.actions" class="k-card__header">
            <div class="k-card__header__title">{{ title }}</div>
            <div class="k-card__header__actions">
                <slot name="actions" />
            </div>
        </div>

        <div 
            class="k-card__body" 
            :class="bodyClasses"
        >
            <slot />
        </div>
    </div>
</template>

<style lang="scss">
.k-card {
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0px 0px 2px 0px rgba(158, 158, 158, 0.3);

    &__header {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;

        > * {
            padding: 4px 0;
        }

        &__title {
            color: #3D3D3D;
            font-size: 18px;
        }

        &__actions {
            // max-width: 50%;
        }
    }

    &__body {
        margin-top: 14px;
    }
}
</style>